namespace IrisGenerator.Dal {
    using System;
    using System.Collections.Generic;
    using System.Data.SqlClient;
    using System.Configuration;
    using System.Data;
    using System.Xml;
    
    
    public partial class Project : IDisposable {
        
        private DataAccess _dataAccess;
        
        public Project() {
            this._dataAccess = new DataAccess();
        }
        
        public virtual System.Data.DataSet PROJECT_Select_All() {
            this._dataAccess.CreateProcedureCommand("sp_PROJECT_Select_All");
            DataSet value = this._dataAccess.ExecuteDataSet();
            return value;
        }
        
        public virtual System.Data.DataSet PROJECT_Select_One(System.Nullable<System.Guid> PRO_ID) {
            this._dataAccess.CreateProcedureCommand("sp_PROJECT_Select_One");
            this._dataAccess.AddParameter("PRO_ID", PRO_ID, ParameterDirection.Input);
            DataSet value = this._dataAccess.ExecuteDataSet();
            return value;
        }
        
        public virtual System.Nullable<System.Guid> PROJECT_Insert(string PRO_NAME, System.Nullable<System.DateTime> PRO_CREATION, System.Nullable<System.DateTime> PRO_MODIFICATION, System.Nullable<System.DateTime> PRO_ANALYZE, System.Nullable<System.DateTime> PRO_GENERATE) {
            this._dataAccess.CreateProcedureCommand("sp_PROJECT_Insert");
            this._dataAccess.AddParameter("PRO_NAME", PRO_NAME, ParameterDirection.Input);
            this._dataAccess.AddParameter("PRO_CREATION", PRO_CREATION, ParameterDirection.Input);
            this._dataAccess.AddParameter("PRO_MODIFICATION", PRO_MODIFICATION, ParameterDirection.Input);
            this._dataAccess.AddParameter("PRO_ANALYZE", PRO_ANALYZE, ParameterDirection.Input);
            this._dataAccess.AddParameter("PRO_GENERATE", PRO_GENERATE, ParameterDirection.Input);
            Guid value = ((Guid)(this._dataAccess.ExecuteScalar()));
            return value;
        }
        
        public virtual System.Nullable<int> PROJECT_Delete(System.Nullable<System.Guid> PRO_ID) {
            this._dataAccess.CreateProcedureCommand("sp_PROJECT_Delete");
            this._dataAccess.AddParameter("PRO_ID", PRO_ID, ParameterDirection.Input);
            int value = this._dataAccess.ExecuteNonQuery();
            return value;
        }
        
        public virtual System.Nullable<int> PROJECT_Update(System.Nullable<System.Guid> PRO_ID, string PRO_NAME, System.Nullable<System.DateTime> PRO_CREATION, System.Nullable<System.DateTime> PRO_MODIFICATION, System.Nullable<System.DateTime> PRO_ANALYZE, System.Nullable<System.DateTime> PRO_GENERATE) {
            this._dataAccess.CreateProcedureCommand("sp_PROJECT_Update");
            this._dataAccess.AddParameter("PRO_ID", PRO_ID, ParameterDirection.Input);
            this._dataAccess.AddParameter("PRO_NAME", PRO_NAME, ParameterDirection.Input);
            this._dataAccess.AddParameter("PRO_CREATION", PRO_CREATION, ParameterDirection.Input);
            this._dataAccess.AddParameter("PRO_MODIFICATION", PRO_MODIFICATION, ParameterDirection.Input);
            this._dataAccess.AddParameter("PRO_ANALYZE", PRO_ANALYZE, ParameterDirection.Input);
            this._dataAccess.AddParameter("PRO_GENERATE", PRO_GENERATE, ParameterDirection.Input);
            int value = this._dataAccess.ExecuteNonQuery();
            return value;
        }
        
        public virtual void Dispose() {
            if ((this._dataAccess != null)) {
                this._dataAccess.Dispose();
            }
        }
    }
}
